import { createRouter, createWebHashHistory, RouteRecordRaw } from "vue-router";

const routes: Array<RouteRecordRaw> = [
  {
    path: "/login",
    component: () => import("@/views/login/index.vue"),
  },
];
const router = createRouter({
  history: createWebHashHistory(),
  routes,
});
// 路由守卫逻辑
router.beforeEach((to, from, next) => {
  console.log();
});
// 解决路由跳转后回到顶部
router.afterEach((to, from, next) => {});
export default router;
